home *** CD-ROM | disk | FTP | other *** search
- # dir - a really dumb directory listing program. Has no options, only
- # lists the current dir. If you interrupt dir, it will leave the cursor
- # turned off; see the last line of the script for how to turn it back
- # on. Also, it is not very efficient, as it must Examine() each file
- # up to 5 times to get its information.
- # Dir is presented as is; no warrantee is either expressed or implied
- # as to it's suitability to any purpose whatsoever. You assume all the
- # risk for all damage, even if caused by a defect in the software,
- # no matter how awful.
- echo -n "\33[0 p" # turn off cursor for speed
- local s d t rwed i pad
- foreach i ( * )
- if -d "$i"
- s="<dir>"
- else
- s=-s "$i"
- endif
- t=-t "$i",d=-T "$i",rwed=-p "$i",pad=left(" ",8-strlen(s))
- echo "$rwed $t $d$pad$s $i"
- end
- echo -n "\33[ p" # turn cursor back on
-